/* Avenir风格的Markdown主题 */
.markdown-theme-avenir {
  font-family: "Avenir Next", "Avenir", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  padding: 20px;
  max-width: 760px;
  margin: 0 auto;
  letter-spacing: 0.01em;
}

.markdown-theme-avenir h1,
.markdown-theme-avenir h2,
.markdown-theme-avenir h3,
.markdown-theme-avenir h4,
.markdown-theme-avenir h5,
.markdown-theme-avenir h6 {
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.8em;
  color: #000;
  line-height: 1.2;
}

.markdown-theme-avenir h1 {
  font-size: 2em;
  margin-top: 0.8em;
  margin-bottom: 1em;
  font-weight: 700;
}

.markdown-theme-avenir h2 {
  font-size: 1.6em;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.3em;
}

.markdown-theme-avenir h3 {
  font-size: 1.3em;
}

.markdown-theme-avenir h4 {
  font-size: 1.1em;
}

.markdown-theme-avenir p {
  margin-bottom: 1.3em;
}

.markdown-theme-avenir a {
  color: #0070c9;
  text-decoration: none;
}

.markdown-theme-avenir a:hover {
  text-decoration: underline;
}

.markdown-theme-avenir blockquote {
  margin: 1em 0;
  padding: 0 1em;
  color: #666;
  border-left: 4px solid #0070c9;
}

.markdown-theme-avenir code {
  font-family: "SF Mono", "Menlo", "Monaco", "Consolas", "Courier New", monospace;
  background-color: #f5f5f5;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

.markdown-theme-avenir pre {
  background-color: #f5f5f5;
  padding: 16px;
  border-radius: 5px;
  overflow-x: auto;
  margin: 1.2em 0;
}

.markdown-theme-avenir pre code {
  background-color: transparent;
  padding: 0;
}

.markdown-theme-avenir img {
  max-width: 100%;
  margin: 1.2em auto;
  display: block;
  border-radius: 4px;
}

.markdown-theme-avenir hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 2em 0;
}

.markdown-theme-avenir ul,
.markdown-theme-avenir ol {
  margin-bottom: 1.2em;
  padding-left: 2em;
}

.markdown-theme-avenir li {
  margin-bottom: 0.4em;
}

.markdown-theme-avenir table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2em 0;
  border: 1px solid #eee;
}

.markdown-theme-avenir table th,
.markdown-theme-avenir table td {
  border: 1px solid #eee;
  padding: 8px 12px;
  text-align: left;
}

.markdown-theme-avenir table th {
  background-color: #f5f5f5;
  font-weight: 600;
}

.markdown-theme-avenir table tr:nth-child(even) {
  background-color: #f8f8f8;
}

/* 特殊元素 */
.markdown-theme-avenir .note {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 5px;
  margin: 1.2em 0;
  border-left: 4px solid #0070c9;
}

.markdown-theme-avenir .warning {
  background-color: #fff8e6;
  padding: 15px;
  border-radius: 5px;
  margin: 1.2em 0;
  border-left: 4px solid #f5a623;
}

/* 暗色模式 */
.dark-mode .markdown-theme-avenir {
  color: #e5e5e5;
  background-color: #1c1c1e;
}

.dark-mode .markdown-theme-avenir h1,
.dark-mode .markdown-theme-avenir h2,
.dark-mode .markdown-theme-avenir h3,
.dark-mode .markdown-theme-avenir h4,
.dark-mode .markdown-theme-avenir h5,
.dark-mode .markdown-theme-avenir h6 {
  color: #fff;
}

.dark-mode .markdown-theme-avenir h2 {
  border-bottom: 1px solid #333;
}

.dark-mode .markdown-theme-avenir a {
  color: #409cff;
}

.dark-mode .markdown-theme-avenir blockquote {
  color: #999;
  border-left: 4px solid #409cff;
}

.dark-mode .markdown-theme-avenir code {
  background-color: #2a2a2c;
}

.dark-mode .markdown-theme-avenir pre {
  background-color: #2a2a2c;
}

.dark-mode .markdown-theme-avenir hr {
  border-top: 1px solid #333;
}

.dark-mode .markdown-theme-avenir table {
  border: 1px solid #333;
}

.dark-mode .markdown-theme-avenir table th,
.dark-mode .markdown-theme-avenir table td {
  border: 1px solid #333;
}

.dark-mode .markdown-theme-avenir table th {
  background-color: #2a2a2c;
}

.dark-mode .markdown-theme-avenir table tr:nth-child(even) {
  background-color: #242426;
}

.dark-mode .markdown-theme-avenir .note {
  background-color: #2a2a2c;
  border-left: 4px solid #409cff;
}

.dark-mode .markdown-theme-avenir .warning {
  background-color: #3a3a28;
  border-left: 4px solid #f5a623;
} 